import 'package:flutter/material.dart';
import 'package:local_coffee/components/rgba.dart';
import 'package:local_coffee/components/c_appbar/custom_appbar.dart';
import 'package:local_coffee/components/c_row/custom_row.dart';
import 'package:local_coffee/components/icon.dart';
import 'package:local_coffee/utils/global.dart';

class ExampleCRow extends StatefulWidget {
  
  ExampleCRow({
    Key key
  }) : super(key: key);

  _ExampleCRowState createState() => _ExampleCRowState();
}

class _ExampleCRowState extends State<ExampleCRow> {
  
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: customAppBar(
        title: 'CRow',
        context: context
      ),
      body: Column(
        children: <Widget>[
          Container(
            margin: EdgeInsets.only(top: 10),
            child: CustomRow( 
              leftChild: Container(
                width: 30,
                child: icon0xe60e(
                  color: RGBA.rgbae4e4e4,
                ),
              ),
              centerChild: Text(
                '个人信息',
                style: TextStyle(
                  color: RGBA.rgba383838
                ),
              ),
              rightChild: Row(
                children: <Widget>[
                  Text(
                    '7 张',
                    style: TextStyle(
                      color: RGBA.rgbaa6a6a6
                    ),
                  ),
                  icon0xe60f(
                    color: RGBA.rgbae4e4e4,
                    size: 14
                  )
                ],
              ),
            ),
          ),
          Container(
            child: CustomRow(
              border: G.borderBottom(show: false),
              leftChild: Container(
                width: 30,
                child: Container(
                  padding: EdgeInsets.only(bottom: 3, right: 1),
                  child: icon0xe614(
                    color: RGBA.rgbae4e4e4,
                    size: 20
                  ),
                ),
              ),
              centerChild: Text(
                '咖啡钱包',
                style: TextStyle(
                  color: RGBA.rgba383838,
                ),
              ),
              rightChild: Row(
                children: <Widget>[
                  Text(
                    '7张',
                    style: TextStyle(
                      color: RGBA.rgbaa6a6a6,
                    ),
                  ),
                  icon0xe60f(
                    color: RGBA.rgbae4e4e4,
                    size: 14
                  )
                ],
              ),
            ),
          ),
          Container(
            margin: EdgeInsets.only(top: 10),
            child: Column(
              children: <Widget>[
                CustomRow(
                  height: 70,
                  leftChild: Column(
                    mainAxisAlignment: MainAxisAlignment.center,
                    children: <Widget>[
                      Text(
                        '现在下单',
                        style: TextStyle(
                          color: RGBA.rgba383838,
                          fontWeight: FontWeight.bold,
                          fontSize: 16
                        ),
                      ),
                      Text(
                        'Order Now',
                        style: TextStyle(
                          color: RGBA.rgba808080,
                          fontSize: 10
                        ),
                      )
                    ],
                  ),
                  rightChild: Container(
                    width: 40,
                    height: 40,
                    decoration: BoxDecoration(
                      border: Border.all(
                        color: RGBA.rgba63473a,
                      ),
                      borderRadius: BorderRadius.circular(20),
                    ),
                    child: Container(
                      padding: EdgeInsets.only(left: 2),
                      child: icon0xe60a(
                        color: RGBA.rgba63473a,
                        size: 20
                      ),
                    ),
                  ),
                ),
                CustomRow(
                  height: 70,
                  border: G.borderBottom(show: false),
                  leftChild: Column(
                    mainAxisAlignment: MainAxisAlignment.center,
                    crossAxisAlignment: CrossAxisAlignment.start,
                    children: <Widget>[
                      Row(
                        children: <Widget>[
                          Text(
                            '咖啡钱包',
                            style: TextStyle(
                              color: RGBA.rgba383838,
                              fontWeight: FontWeight.bold,
                              fontSize: 16
                            ),
                          )
                        ],
                      ),
                      Row(
                        children: <Widget>[
                          Text(
                            'Coffee Wallet',
                            style: TextStyle(
                              color: RGBA.rgba808080,
                              fontSize: 10
                            ),
                          )
                        ],
                      )
                    ],
                  ),
                  rightChild: Container(
                    width: 40,
                    height: 40,
                    decoration: BoxDecoration(
                      border: Border.all(
                        color: RGBA.rgba63473a
                      ),
                      borderRadius: BorderRadius.circular(20),
                    ),
                    child: Container(
                      padding: EdgeInsets.only(left: 2),
                      child: icon0xe607(
                        color: RGBA.rgba63473a,
                        size: 20
                      ),
                    ),
                  ),
                ),
                Column(
                  children: <Widget>[
                    Container(
                      margin: EdgeInsets.only(top: 10),
                      child: CustomRow(
                        centerChild: Container(
                          alignment: Alignment.center,
                          child: Text('这是 centerChild'),
                        ),
                      ),
                    ),
                    Container(
                      child: CustomRow(
                        centerChild: Text('这是 centerChild'),
                      ),
                    )
                  ],
                )
              ],
            ),
          )
        ],
      ),
    );
  }
}